# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=android-udev-rules
pkgver=20240221
pkgrel=0
pkgdesc="Android udev rules list"
url="https://github.com/M0Rf30/android-udev-rules"
arch="noarch"
license="GPL-3.0-only"
depends="udev"
install="$pkgname.pre-install"
source="https://github.com/M0Rf30/android-udev-rules/archive/$pkgver/android-udev-rules-$pkgver.tar.gz"
options="!check" # no testsuite provided

prepare() {
	default_prepare

	# use plugdev as the group permitted to use adb devices
	sed -i 's/adbusers/plugdev/' 51-android.rules
}

package() {
	install -Dm644 51-android.rules -t "$pkgdir"/usr/lib/udev/rules.d/
}

sha512sums="
152012c450dfa98b047d43162d15c614f7349c774de36c7ebdd8beff88fcb08e162cb5b8c8ab647b4058c510a3b5f65888d02402e86bea6726159051e0f5bc72  android-udev-rules-20240221.tar.gz
"
